This script will not submit unless the text field has data.
<BODY onLoad="document.forms[0].F1.focus();document.forms[0].F1.select()"> function validate() { if (document.forms[0].F1.value.length == 0) { alert('You can not submit an empty text field') return false } else { alert('About to submit...') return true } }